public class FruitManager {
    private static FruitManager instance;

    private FruitManager() {
        // 禁止外部实例化
    }

    public static FruitManager getInstance() {
        if (instance == null) {
            instance = new FruitManager();
        }
        return instance;
    }

    public void addFruit(Fruit fruit) {
        // 实现添加水果的逻辑
    }
}